<?php
/**
 * ユニットテストクラス
 */
require_once 'simpletest/unit_tester.php';
require_once 'simpletest/reporter.php';
require_once __DIR__ . '/../xml/ScoreXmlController.php';

/**
 * スコアＸＭＬユニットテスト
 */
class Models_Score_Xml_Controller_Test extends UnitTestCase
{
	/** スコアＸＭＬクラス */
	protected $_object;


	/** 保存テスト */
	public function Test1100()
	{
		$this->_object = new Models_Score_Xml_Controller('test');
		$this->_object->saveToFile(1,2,3,4);
		$RET = $this->_object->loadFromFile('test');
		print_r($RET);
	}

	/** 読み込みテスト */
	public function Test2100()
	{
		$this->_object = new Models_Score_Xml_Controller('test');

		$RET = $this->_object->getFirstHalfPoint();
		$this->assertEqual($RET, 1);
		$RET = $this->_object->getFirstHalfLost();
		$this->assertEqual($RET, 2);
		$RET = $this->_object->getSecondHalfPoint();
		$this->assertEqual($RET, 3);
		$RET = $this->_object->getSecondHalfLost();
	}
}